package com.webcamtracker.tracker.model;

import com.webcamtracker.utils.Hits;

import java.awt.*;


public class SimpleTrackerModel extends AbstractTrackerModel {
    private int width;
    private int height;
    private int x;
    private int y;
    private Hits hits;


    public SimpleTrackerModel(int width, int height, int x, int y, Hits hits) {
        this(width, height, x, y, hits, "");
    }


    public SimpleTrackerModel(int width, int height, int x, int y, Hits hits, String name) {
        this.width = width;
        this.height = height;
        this.x = x;
        this.y = y;
        this.hits = hits;
        setName(name);
    }

    public void add(ModelElement element) {

    }

    public int getWidth() {
        return width;
    }

    public int getHeight() {
        return height;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }


    public Hits getHits() {
        return hits;
    }


    public boolean contains(TrackerModel model) {
        return false;
    }

    public boolean contains(int x, int y) {
        return false;
    }

    public void paint(Graphics g) {
        g.setColor(Color.GREEN);
        g.drawRect(getX(), getY(), getWidth(), getHeight());
    }

    public void setHits(Hits hits) {
        System.out.println("InitialTrackerModel.setHits");
        this.hits = hits;
    }
}
